package com.guochu.org.entity;

import com.guochu.common.enums.ErrorEnum;
import com.guochu.common.infrastructure.IEntity;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * 登录账号表 (Login)实体类
 *
 * @author bunting.wei
 * @since 2020-12-11 16:22:16
 */
public class Login extends IEntity implements Serializable {
    private static final long serialVersionUID = -41111928197636261L;
    /**
     * 用户主键
     */
    private String userId;
    /**
     * 账号
     */
    private String account;
    /**
     * 密码
     */
    private String password;
    /**
     * 加密向量
     */
    private String secretkey;
    /**
     * 微信openid
     */
    private String weChatKey;


    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSecretkey() {
        return secretkey;
    }

    public void setSecretkey(String secretkey) {
        this.secretkey = secretkey;
    }

    public String getWeChatKey() {
        return weChatKey;
    }

    public void setWeChatKey(String weChatKey) {
        this.weChatKey = weChatKey;
    }

    public ErrorEnum verifyUpdPas() {
        if (!StringUtils.isBlank(getUserId())) {
            return null;
        }
        if (!StringUtils.isBlank(getPassword())) {
            return null;
        }
        //异常提示
        return ErrorEnum.A_MUST_PARAMETER;
    }

}
